﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="Website.BoardWebControl.test" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>

 

</head>
<body>
    <form id="form1" runat="server">
        <div id="Div0" 
            style="height:600px; width:500px; border-style:solid; position: absolute; left: 50px;">
            <div id="Div1" style="height:50px; width:100px; border-style:solid;">
            </div>
        
            <div id="Div2" style="height:50px; width:100px; border-style:solid;">
            </div>
        </div>
    </form>
      
    
    <script type="text/javascript">
        
        function createDiv()
        {
            var canvas = document.createElement("div");
            canvas.setAttribute("id","canvas");
            canvas.setAttribute("style","border-style:solid;");
            Div1.style.height = "80px";
            
            Div1.style.position="relative";
            canvas.style.height="50px";
            Div1.style.left="50px";
            document.body.appendChild(canvas);
        }
            
        createDiv();
        alert(Div2.style.left);
    </script>
</body>

   
</html>
